#!/bin/sh

# J12 2PIN IR-CUTA/IR-CUTB
#bspmm 0x11130040 0x1100 #IR-CUT GPIO1_2
#echo 10 > /sys/class/gpio/export
#echo out > /sys/class/gpio/gpio10/direction
#echo 0 > /sys/class/gpio/gpio10/value

#bspmm 0x11130044 0x1202 #IR-CUT GPIO1_3
#echo 11 > /sys/class/gpio/export
#echo out > /sys/class/gpio/gpio11/direction
#echo 0 > /sys/class/gpio/gpio11/value

# J10 5PIN CDS/PWM_WIRTE/PWM_IR/GPIO1_4
bspmm 0x11130000 0x1200	#CDS/GPIO1_5
#echo 13 > /sys/class/gpio/export
#echo in > /sys/class/gpio/gpio13/direction
#cat  /sys/class/gpio/gpio13/value

#bspmm 0x11130038 0x1100	# PWM_WIRTE/GPIO7_7
#echo 63 > /sys/class/gpio/export
#echo out > /sys/class/gpio/gpio63/direction
#echo 0 > /sys/class/gpio/gpio63/value

#bspmm 0x1113003C 0x1100 # PWM_IR/GPIO1_0
#echo 8 > /sys/class/gpio/export
#echo out > /sys/class/gpio/gpio8/direction
#echo 0 > /sys/class/gpio/gpio8/value

bspmm 0x11130004 0x1200 # GPIO1_4
echo 12 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio12/direction
echo 0 > /sys/class/gpio/gpio12/value

# J14 4PIN USB_PWREN/USB HOST/DEVICE MODE
bspmm 0x17940000 0x1201 #GPIO5_6
echo 46 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio46/direction
echo 0 > /sys/class/gpio/gpio46/value
#echo host > /proc/10300000.usb20drd/mode

# J1/J11 SPK/MIC  V1.0
bspmm 0x11130030 0x1202 #GPIO0_6
echo 6 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio6/direction
echo 0 > /sys/class/gpio/gpio6/value

# J1/J11 SPK/MIC  V1.1
bspmm 0x17940094 0x1200 #GPIO7_1
echo 57 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio57/direction
echo 1 > /sys/class/gpio/gpio57/value

# J15 UART2
bspmm 0x11130048 0x1135 #UART2_RX GPIO1_1
bspmm 0x1113004c 0x11f5 #UART2_TX GPIO7_6
